<?php
declare (strict_types = 1);

namespace app\api\model;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @mixin \think\Model
 */
class SpecValue extends Model
{
    //use SoftDelete;
    /**
     * 根据类型id删除指定的规格值
     * @param $typeId
     * @return bool
     */
    public static function getTypeIdByDeleteSpecValue($typeId){
        return self::where("type_id",$typeId)->delete();
    }
    /**
     * 规格值批量入库
     * @param $data
     * @return \think\Collection
     * @throws \Exception
     */
    public function addSpecValue($data){
        return $this->saveAll($data);
    }

}
